#region

using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.InterceptionExtension;

#endregion

namespace SmartInspect.Extensions.Unity
{
    public class SiWrappedCallAttribute : SiBaseAttribute, ISiWrappedCallAttribute
    {
        protected SiWrappedCallAttribute()
        {
            LogArgumentsToViewer = true;
            Order = 3;
        }

        public override ICallHandler CreateHandler(IUnityContainer container)
        {
            return new SiWrappedCallHandler
            {
                NamePrefix = NamePrefix,
                NameSuffix = NameSuffix,
                SuffixSeparator = SuffixSeparator,
                PrefixSeparator = PrefixSeparator,
                Level = Level,
                Order = Order,
                LogArgumentsToViewer = LogArgumentsToViewer,
                TypePolicy = TypePolicy
            };
        }
    }
}